<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
export default {
  name: 'App',
  data: function() {
    return {
      token: localStorage.getItem('token')
    }
  },
  created() {
    if (this.token) {
      this.$store.dispatch('user/getUserInfoByToken')
    }
  }
}

</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2C3E50;
}
</style>
